import { defineStore } from 'pinia'

export const useGlobalStore = defineStore<string, {pageName : string, loginStatus : boolean, client : 'wx' | 'ali', isWX : boolean; isAli : boolean; provider : string; accessToken : string; accessExpireIn : number}>('global', {
    state() {
        return {
            client : 'wx',
            isWX : false,
            isAli : false,
            provider : '',
            accessToken : '',
            accessExpireIn : 0,
            loginStatus : false,
            pageName : '爱优好搭子'
        }
    }
})


export const useCommonStore = defineStore<string, {staticUrl?:string, wxShare?:{title : string; cover : string}}>('common', {
    state() {
        return {
            staticUrl : ''
        }
    }
})